/*
 * ChildFrame.cpp
 *
 *  Created on: 2012-8-28
 *      Author: yangentao@gmail.com
 */

#include "ChildFrame.h"

namespace ui {

const LPCTSTR ChildFrame::ChildFrameClassName = TEXT("__ChildFrameClassName__");
WindowClass ChildFrame::childFrameClass;

ChildFrame::ChildFrame() {
	if (!childFrameClass.isRegistered()) {
		childFrameClass.createClass(ChildFrameClassName);
		childFrameClass.registerClass();
	}
}
ChildFrame::~ChildFrame() {

}
bool ChildFrame::create(HWND parent, LPCTSTR title, int x, int y, int width, int height) {
	return create(parent, title, Rect(x, y, x + width, y + height));
}
bool ChildFrame::create(HWND parent, LPCTSTR title, Rect rect) {
	DWORD style = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CHILD;
	DWORD exStyle = 0;
	return Super::create(ChildFrameClassName, title, style, exStyle, rect, 0);
}

} /* namespace ui */
